package com.duobaoyu.dby.supply.common.biz.remote.to.refund;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.List;

/**
 * @author liyang
 * @version 1.0.0
 * @ClassName AfterSaleSettingConfigTO
 * @createTime 11:02:00 2023/08/28
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class AfterSaleSettingConfigTO implements Serializable {
	private static final long serialVersionUID = 8475955195923666188L;

	/**
	 * 渠道编码
	 */
	private String channelCode;
	/**
	 * 配置类型 1->预估运费配置；2->售后配置；3->审核策略配置
	 * //@see ChannelSettingTypeEnum
	 */
	private Integer configType;

	/**
	 * 售后配置不能为空
	 */
	private List<AfterSaleConfig> afterSaleConfigs;

	/**
	 * 售后配置
	 */
	@Data
	public static class AfterSaleConfig {
		/**
		 * 配置名称
		 */
		private String configName;
		/**
		 * 仓库类型
		 * //@see RepositoryTypeEnum
		 */
		private List<Integer> repositoryTypes;
		/**
		 * 售后类型
		 */
		private List<Integer> afterSaleTypes;
		/**
		 * 售后规则
		 */
		private List<AfterSaleRule> afterSaleRules;
		/**
		 * 售后说明（图片URL）
		 */
		private String explainUrl;

		@Data
		public static class AfterSaleRule {
			/**
			 * 售后类型
			 */
			private Integer afterSaleType;
			/**
			 * 支持的订单状态
			 */
			private List<Integer> orderStatus;
		}
	}
}
